<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>diophant</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>diophant</b> -  diophantine (Bezout) equation</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>[x,err]=diophant(p1p2,b)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>p1p2</b>
        </tt>: polynomial vector <tt>
          <b>p1p2 = [p1 p2]</b>
        </tt>
      </li>
      <li>
        <tt>
          <b>b</b>
        </tt>: polynomial</li>
      <li>
        <tt>
          <b>x</b>
        </tt>: polynomial vector [x1;x2]</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b> diophant</b>
      </tt> solves the bezout equation:</p>
    <p>
      <tt>
        <b>p1*x1+p2*x2=b</b>
      </tt> with  <tt>
        <b>p1p2</b>
      </tt> a polynomial vector.
    If the equation is not solvable</p>
    <p>
    else <tt>
        <b>err=0</b>
      </tt>
    </p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

s=poly(0,'s');p1=(s+3)^2;p2=(1+s);
x1=s;x2=(2+s);
[x,err]=diophant([p1,p2],p1*x1+p2*x2);
p1*x1+p2*x2-p1*x(1)-p2*x(2)
 
  </pre>
  </body>
</html>
